package com.yyk.yiliao.mvvm.ui

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.ViewModelProviders
import com.yyk.yiliao.R
import com.yyk.yiliao.databinding.ActivityMineBinding
import com.yyk.yiliao.mvvm.view_model.MineViewModel

class MineActivity : AppCompatActivity() {
    private val viewModel by lazy {
        ViewModelProviders.of(this).get(MineViewModel::class.java)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding: ActivityMineBinding = DataBindingUtil.setContentView(this,
                R.layout.activity_mine)
        binding.viewModel = viewModel
        binding.lifecycleOwner = this
    }
}
